<HTML>
<HEAD>
  <!-- Created with AOLpress/2.0 -->
  <!-- AP: Created on: 27-Oct-2005 -->
  <!-- AP: Last modified: 24-Dec-2005 -->
  <TITLE>FontForge install procedures for cygwin (MS/Windows)</TITLE>
</HEAD>
<BODY>
<H1 ALIGN=Center>
  FontForge install procedures<BR>
  <SMALL>for cygwin under MS Windows</SMALL>
</H1>
<UL>
  <LI>
    <A HREF="#Installing">Installing from a pre-built cygwin package</A>
    <UL>
      <LI>
	<A HREF="#Before">Before you install</A>
      <LI>
	<A HREF="#Alternatives">Alternatives to cygwin</A>
      <LI>
	<A HREF="#Obtaining">Obtaining one of my pre-built packages</A>
      <LI>
	<A HREF="#install">Installing</A>
      <LI>
	<A HREF="#Notes">Notes</A>
    </UL>
  <LI>
    <A HREF="#src-MS">Before you build (on MS/Windows)</A>
  <LI>
    <A HREF="#src-source">Building and installing from source</A>
    <UL>
      <LI>
	<A HREF="#src-distribution">Obtaining a source distribution</A>
	<UL>
	  <LI>
	    <A HREF="#src-tarball">tarball</A>
	  <LI>
	    <A HREF="#src-cvs">from the cvs tree</A>
	</UL>
      <LI>
	<A HREF="#src-Building">Building &amp; installing it</A>
      <LI>
	<A HREF="#src-installs">More complicated installs</A>
    </UL>
  <LI>
    <A HREF="#Dependencies">Dependencies (external libraries/helper programs)</A>
  <LI>
    <A HREF="#suggested-fonts">Suggested fonts</A>
  <LI>
    <A HREF="#Documentation">Installing documentation</A>
    <UL>
      <LI>
	<A HREF="#doc-tar">Installing a documentation tarball</A>
    </UL>
  <LI>
    <A HREF="README-MS.html#PATH">Some notes on the PATH variable</A>
  <LI>
    <A HREF="#run-cygwin">Running FontForge</A>
  <LI>
    <A HREF="#cygwin-troubles">Troubleshooting</A>
  <LI>
    <A HREF="#Bugs">Reporting Bugs</A>
</UL>
<H2>
  <A NAME="Installing">Installing</A> from a pre-built package
</H2>
<H3>
  <A NAME="Before">Before</A> you install
</H3>
<P>
You must ensure that you have <A HREF="http://www.cygwin.com/">cygwin</A>
installed on your system. Cygwin is free. (cygwin makes MS Windows look enough
like unix to allow fontforge to run there). Getting all the bits of cygwin
seems to be the hardest part of installing fontforge -- probably because
it is the least expected part.
<UL>
  <LI>
    First download the setup.exe program from
    <A TARGET="_top" HREF="http://www.cygwin.com/">http://www.cygwin.com/</A>
  <LI>
    Run it. It will ask you what components of cygwin you wish to install
  <LI>
      You will need the default stuff, plus the X window system, binutils, libpng, libjpeg,
      and libxml2.
    <P>
      Most of what you need you get by default. But you must explicitly request
      X11 and the libraries.
    <P>
    Once you have cygwin installed, start it. This should give you a terminal
    window running bash (a unix shell)
</UL>
<H3>
  <A NAME="Alternatives">Alternatives</A> to cygwin.
</H3>
<P>
There are now alternatives to cygwin. Instead of downloading cygwin you can
install one of the virtual machines (or something similar) which run linux,
and then install fontforge from a linux package.
<UL>
  <LI>
    <A HREF="http://www.andlinux.org/">andLinux</A>
</UL>
<H3>
  <A NAME="Obtaining">Obtaining</A> one of my pre-built packages
</H3>
<P>
I post a cygwin install package on
<A HREF="http://sourceforge.net/project/showfiles.php?group_id=103338&amp;package_id=111040">sourceforge's
file release system</A>. There's a certain amount of pother involved in using
the file release system, but you get the file eventually.
<UL>
  <LI>
    If you follow the
    <A HREF="http://sourceforge.net/project/showfiles.php?group_id=103338&amp;package_id=111040">link
    above </A>you will end up on a page showing many releases of FontForge for
    many systems<BR>
    in most cases you will want the most recent release.
  <LI>
    Then click on the executable package you want to download:
    <UL>
      <LI>
	The cygwin release will be called something like
	"fontforge_cygwin-200xxxxx.tar.bz2
    </UL>
  <LI>
    Then you have the joy of choosing a mirror site (pick one that's on the same
    continent you are) and click on the little icon in the download column
  <LI>
    Then you wait. After a bit you get another copy of this same page. After
    an even longer time your browser notices that you've started a download.
</UL>
<H3>
  <A NAME="install">Installing</A>
</H3>
<P>
I have no idea where your browser put the package you have just downloaded.
This is unfortunate as I can't tell you exactly what to do next. But find
the package (often it's on the desktop) and then move it into
C:\cygwin\home\&lt;username&gt;. (where &lt;username&gt; is whatever name
cygwin gave you)
<UL>
  <LI>
    Then open a cygwin window (by clicking on the cygwin icon)
  <LI>
    With luck you will now be in the directory containing the package you downloaded.
  <LI>
    Now type (<SMALL>The "$" or "#" are example prompts from the computer. Do
    not type them yourself</SMALL>):
    <BLOCKQUOTE>
      <PRE><FONT COLOR="Gray">$ </FONT>bunzip2 fontforge_cygwin-*.tar.bz2
<FONT COLOR="Gray">$ </FONT>tar xf fontforge_cygwin-*.tar
<FONT COLOR="Gray">$ </FONT>cd fontforge
<FONT COLOR="Gray">$ </FONT>./doinstall
</PRE>
    </BLOCKQUOTE>
  <LI>
    Then each time you want to run fontforge, start X11
    <UL>
  <LI> On recent cygwin systems you may start X by invoking:
    <BLOCKQUOTE>
      <PRE>C:\cygwin\usr\X11R6\bin\startxwin.bat
</PRE>
    </BLOCKQUOTE>
  <LI> Or:
    <BLOCKQUOTE>
      <PRE>startx
</PRE>
    </BLOCKQUOTE>
  <LI>While on older systems try:
    <BLOCKQUOTE>
      <PRE><FONT COLOR="Gray">$ </FONT>xinit
</PRE>
    </BLOCKQUOTE>
  <LI>
  </UL>
    This should bring up X in a large window that covers the screen and within
    that should be a subwindow, an xterm, running bash.
  <LI>
    From the xterm you should first start a window manager:
    <BLOCKQUOTE>
      <PRE><FONT COLOR="Gray">$ </FONT>twm &amp;
</PRE>
    </BLOCKQUOTE>
  <LI>
    And then you will be able start FontForge.
    <BLOCKQUOTE>
      <PRE><FONT COLOR="Gray">$ </FONT>fontforge -new
</PRE>
    </BLOCKQUOTE>
</UL>
<H3>
  <A NAME="Notes">Notes</A>
</H3>
<P>
<FONT COLOR="Red"><STRONG>Caveat: </STRONG></FONT>cygwin has a different
approach to the file system than Windows. A filename like
<CODE>C:\windows\fonts\arial.ttf </CODE>will be called
<CODE>/cygdrive/c/windows/fonts/arial.ttf </CODE>under cygwin (backslashes
are replaced by slashes, and the initial drive "<CODE>C:</CODE>" becomes
"<CODE>/cygdrive/c</CODE>".
<P>
Similarly a cygwin filename
"<CODE>/home/&lt;username&gt;/myfont.ttf</CODE>" becomes
"<CODE>C:\cygwin\home\&lt;username&gt;\myfont.ttf</CODE>"
<P>
<STRONG><FONT COLOR="Red">Caveat</FONT>:</STRONG> Do <STRONG>NOT</STRONG>
try to install a font by using fontforge to write the font directly to the
Windows\Fonts directory. This doesn't work. Windows needs to do some magic
when installing a font that it can't do if fontforge writes directly there.
Instead have fontforge create the font somewhere else and then use Windows'
own drag &amp; drop technique to move the font from there into Windows\Fonts.
<P>
  <HR>
<H2>
  Before you build (on <A NAME="src-MS">MS/Windows)</A>
</H2>
<P>
You must download the <A HREF="http://www.cygwin.com/">cygwin</A> environment.
You will need
<UL>
  <LI>
    the basic cygwin packages
  <LI>
    the X11 package
  <LI>
    the xterm package
  <LI>
    the package containing gcc, make (probably called c compiler development
    or something)
  <LI>
    You may want to download some additional optional packages to provide support
    for various image formats (See the <A HREF="#Dependencies">Dependencies</A>
    section below).
</UL>
<P>
<FONT COLOR="Red"><STRONG>Caveat: </STRONG></FONT>cygwin has a different
approach to the file system than Windows. A filename like
<CODE>C:\windows\fonts\arial.ttf </CODE>will be called
<CODE>/cygdrive/c/windows/fonts/arial.ttf </CODE>under cygwin (backslashes
are replaced by slashes, and the initial drive "<CODE>C:</CODE>" becomes
"<CODE>/cygdrive/c</CODE>"
<P>
Having done that you should now be ready to build. Open a cygwin terminal
window and be prepared to type commands in it.
<H2>
  Building and installing from <A NAME="src-source">source</A>
</H2>
<H3>
  Obtaining a source <A NAME="src-distribution">distribution</A>
</H3>
<P>
There are two basic ways to obtain a source distribution. One is by downloading
an entire source tree from the web, and the other is by using the cvs utility
to maintain a source tree on your machine which will be as up to date as
possible. The former solution provides more stability, the latter provides
access to cutting edge bugs.
<H4>
  <A NAME="src-tarball">tarball</A>
</H4>
<P>
<A HREF="http://sourceforge.net/project/showfiles.php?group_id=103338&amp;package_id=114328">Sourceforge's
file release system </A>will contain a tarball (a file with the extension
for .tar.bz2).
<P>
After you have downloaded one of these packages, either copy the tarball
to where you are, or move to the directory containing the tarball (I can't
provide explicit instructions here, because I don't know where your browser
put the file) and type (<SMALL>The "$" or "#" are example prompts from the
computer. Do not type them yourself</SMALL>):
<BLOCKQUOTE>
  <PRE><FONT COLOR="Gray">$ </FONT>bunzip2 fontforge*.tar.bz2
<FONT COLOR="Gray">$ </FONT>tar xf fontforge*.tar
<FONT COLOR="Gray">$ </FONT>cd fontforge-*
</PRE>
</BLOCKQUOTE>
<H4>
  from the <A NAME="src-cvs">cvs</A> tree
</H4>
<P>
cvs is a nifty set of utilities which allows concurrent access to a source
tree by many users. To set up your own (local) copy of the cvs tree (including
documentation), create a new directory, cd into it and type the following
(when it asks for a password, just hit return):
<BLOCKQUOTE>
  <PRE><FONT COLOR="Gray">$ </FONT>cvs -d:pserver:anonymous@cvs1.sourceforge.net:/cvsroot/fontforge login
CVS password:
<FONT COLOR="Gray">$ </FONT>cvs -d:pserver:anonymous@cvs1.sourceforge.net:/cvsroot/fontforge checkout fontforge
<FONT COLOR="Gray">$ </FONT>cd fontforge
</PRE>
</BLOCKQUOTE>
<P>
Once you have established a directory you may update it to obtain the most
recent version of the source by typing:
<BLOCKQUOTE>
  <PRE><FONT COLOR="Gray">$ </FONT>cd fontforge
<FONT COLOR="Gray">$ </FONT>cvs -d:pserver:anonymous@cvs1.sourceforge.net:/cvsroot/fontforge login
CVS password:
<FONT COLOR="Gray">$ </FONT>cvs -d:pserver:anonymous@cvs1.sourceforge.net:/cvsroot/fontforge update
</PRE>
</BLOCKQUOTE>
<P>
You can also
<A HREF="http://cvs.sourceforge.net/viewcvs.py/fontforge/fontforge/">browse
the CVS tree</A> online. Or see
<A HREF="http://sourceforge.net/cvs/?group_id=103338">sourceforge's description
</A>for more information (their information is out of date, the correct server
is cvs1.sf.net not cvs.sf.net), or read the
<A HREF="http://www.cvshome.org/docs/manual/">CVS manual</A>.
<H3>
  <A NAME="src-Building">Building</A> &amp; installing it
</H3>
<P>
Now you have the source installed on your system and you should be positioned
at the top directory of that tree. You need to configure your package (this
is a little program that figures out how to use your system), and then build
it:
<BLOCKQUOTE>
  <PRE><FONT COLOR="Gray">$ </FONT>./configure
<FONT COLOR="Gray">$ </FONT>make
</PRE>
</BLOCKQUOTE>
<P>
<A NAME="su">Having</A> done this you will probably want to install what
you have built. This should be done as root:
<BLOCKQUOTE>
  <PRE><FONT COLOR="Gray">$ </FONT>su
password: ******
# make install
</PRE>
</BLOCKQUOTE>
<P>
On the mac the process is slightly different:
<BLOCKQUOTE>
  <PRE><FONT COLOR="Gray">$ </FONT>sudo make install
password: ******
</PRE>
</BLOCKQUOTE>
<H3>
  More complicated <A NAME="src-installs">installs</A>
</H3>
<P>
The configure script allows you to turn off and on various features of fontforge
that might not be appropriate for your system. Type
<BLOCKQUOTE>
  <PRE><FONT COLOR="Gray">$ </FONT>configure --help
</PRE>
</BLOCKQUOTE>
<P>
for a complete list of options. Some of the most useful are described below.
<H4>
  Building fontforge without X
</H4>
<P>
If you don't want to install X11 on your system, you can use fontforge as
a command line tool which can execute scripts to manipulate fonts. FontForge's
scripting language is described in detail
<A HREF="http://fontforge.sf.net/scripting.html">in the section on
scripting.</A>
<BLOCKQUOTE>
  <PRE><FONT COLOR="Gray">$ </FONT>configure --without-x
</PRE>
</BLOCKQUOTE>
<H4>
  Installing FontForge somewhere other than <CODE>/usr/local</CODE>
</H4>
<P>
If you want to install fontforge in a different directory (say in /usr/bin)
<BLOCKQUOTE>
  <PRE><FONT COLOR="Gray">$ </FONT>configure --prefix=/usr
</PRE>
</BLOCKQUOTE>
<H4>
  Installing <A NAME="installing-documentation-cvs">documentation</A> from
  the cvs tree
</H4>
<P>
If you have a copy of the cvs tree on your system then you should be able
to type
<BLOCKQUOTE>
  <PRE># make install_docs
</PRE>
</BLOCKQUOTE>
<P>
Again you will probably need to be root to do this install too. Use either
"su" or "sudo" as appropriate for your system (<A HREF="#su">see above</A>).
<H2>
  <A NAME="Dependencies">Dependencies</A> (external libraries/helper programs)
</H2>
<P>
If one of the following libraries is missing then
fontforge will not start and will not give any error message.
</UL>
<P>
If you want to edit <A NAME="cidmaps">CID keyed </A>fonts you need these
<A HREF="cidmaps.tgz">character set descriptions</A>. (These were last updated
22-Dec-2004)
<P>
You might want this addition to FontForge's built in
<A HREF="Encodings.ps.gz">character set encodings.</A> Use FontForge's
Encoding-&gt;Load Encoding command to add these encodings to the Encoding
Menu.
<P>
With the appropriate libraries, FontForge can import png, tiff, and gif images
to act as character backgrounds for tracing purposes (FontForge can import
bmp and xbm formats without external libraries). With libxml2 FontForge can
read SVG fonts. With the freetype library FontForge will do a better job
making bitmap characters for you. libuninameslist provides standard unicode
names and annotations for unicode characters (it has been localized into
English and French)
<UL>
  <LI>
    Image Libraries (to allow FontForge to import images in those formats)
    <UL>
      <LI>
	<A HREF="http://www.libpng.org/pub/png/libpng.html">libpng</A> (and required
	helper <A HREF="http://www.gzip.org/zlib/">zlib</A>)
      <LI>
	<A HREF="http://www.libtiff.org/">libtiff</A>
      <LI>
	<A HREF="http://gnuwin32.sourceforge.net/packages/libungif.htm">libungif</A>
      <LI>
	<A HREF="http://www.ijg.org/">libjpeg</A>
    </UL>
  <LI>
    <A HREF="http://xmlsoft.org/">libxml2</A><BR>
    To parse SVG files and fonts
  <LI>
    <A HREF="http://libuninameslist.sf.net">libuninameslist</A><BR>
    To display unicode names and annotations.
  <LI>
    <A HREF="http://www.gnu.org/software/libiconv/">libiconv</A><BR>
    Only important for systems with no built-in iconv(). If not present FontForge
    contains a minimal version of the library which allows it to work. But if
    you want to use libiconv you must configure it with
    <CODE>--enable-extra-encodings</CODE>, as FontForge requires Shift-JIS.
  <LI>
    <A HREF="http://freetype.sf.net/">freetype</A><BR>
    To do a better job rasterizing bitmaps, and to enable the truetype debugger
    <TABLE BORDER CELLPADDING="6" WIDTH="50%" ALIGN=CENTER>
      <TR>
	<TD BGCOLOR="#ffff00">Some of FontForge's commands depend on your compiling
	  freetype with the byte code interpreter enabled. This is disabled by default
	  because it infringes on certain
	  <A HREF="http://freetype.sourceforge.net/patents.html">patents granted to
	  Apple</A>. If you have a license from Apple (or live in a country where these
	  patents do not apply) then you may enable the interpreter by setting the
	  appropriate macro in .../include/freetype/config/ftoption.h before you build
	  the library (see the README.UNX file on the top level of the freetype
	  distribution).
	  <P>
	  To enable the truetype debugger, FontForge needs to have the freetype source
	  directories available when it is built (there are some include files there
	  which it depends on)</TD>
      </TR>
    </TABLE>
  <LI>
    <A HREF="http://www.cygwin.com/">cygwin</A><BR>
    To build or run on a MS Windows system you need the cygwin environment and
    libraries.
    <LI>
      libintl<BR>
      Is standard on most unixes. It is part of the fink package on the mac. Handles
      UI localization.
    <LI>
      <A HREF="http://www.python.org/">libpython</A><BR>
      If present when FontForge is compiled, allows the user to execute python
      scripts within fontforge (and you can configure fontforge so that fontforge's
      functionality can be imported into python -- that is fontforge both
      <I>extends</I> and <I>embeds</I> python)
    <LI>
      <A HREF="http://x.org/">libX</A><BR>
      Normally FontForge depends on the X11 windowing system, but if you are just
      interested in the scripting engines (with no user interface), it may be built
      on systems without X (the configure script should figure this out).
    <LI>
      I do not ship builds with python under cygwin because I don't want to
      force people to download python. (You can build this yourself with
      <CODE>./configure.static</CODE>.
    <LI>
      I do not ship builds with pango or cairo because I could not get them
      to work under cygwin.
</UL>
<P>
If you want to do autotracing around character images you should also download
either
<UL>
  <LI>
    Peter Selinger's <A HREF="http://potrace.sf.net/">potrace</A>
  <LI>
    Martin Weber's <A HREF="http://sourceforge.net/projects/autotrace/">autotrace
    program.</A>
<P>
<P>
Normally FontForge depends on the X11 windowing system, but if you are just
interested in the scripting engine (with no user interface), it may be built
on systems without X (the configure script should figure this out).
<P>
  <A NAME="suggested-fonts">Once</A> upon a time, fontforge only used X11 bitmap
  fonts, on most systems in now uses fontconfig.
  <P>
  There seem plenty of good unicode outline fonts, so I shan't provide any
  suggestions. To install them you simply create a subdirectory called .fonts in
  your home directory, and then copy the font file into that subdirectory.
  <P>
  In the old days there weren't
  many bitmap fonts with good unicode coverage so I provided a list of suggested
  fonts. That's not nearly as important now. But if fontconfig isn't available for
  you, you might want to pull down some old unicode bitmap fonts.
  <UL>
    <LI>
      <A HREF="http://khdd.net/kanou/fonts/ff/fontviewfont-en.html">Kanou's fontview
      fonts</A>
      <A HREF="http://khdd.net/kanou/fonts/ff/fontviewfont.html"><IMG SRC="flags/Nisshoki-Japan.png"
	  WIDTH="39" HEIGHT="26" ALIGN="Middle"></A>
  <LI>
    <A HREF="http://czyborra.com/unifont/">The unifont</A>
  <LI>
    <A HREF="http://math.nmsu.edu/~mleisher/Software/cu/">ClearlyU's font</A>
  <LI>
    <A HREF="http://www.nongnu.org/freefont/">The FreeFont project</A>
  <LI>
    <A HREF="http://www.cl.cam.ac.uk/~mgk25/ucs-fonts.html">X fixed</A>
  <LI>
    <A HREF="http://canopus.iacp.dvo.ru/~panov/cm-unicode/">Computer Modern Unicode
    fonts</A>
  <LI>
    <A HREF="http://eyegene.ophthy.med.umich.edu/unicode/fontguide/">Unicode
    Font Guide for Free/Libre Open Source Operating Systems</A> 
      <HR>
  <LI>
    <A HREF="nonBMP/index.html">FontForge's conventions for non-BMP unicode bitmap
    fonts</A>
</UL>
<P>
To install these, put them in a directory, and in that directory type:
<BLOCKQUOTE>
  <PRE>    <FONT COLOR="Gray">$ </FONT>mkfontdir
    <FONT COLOR="Gray">$ </FONT>xset fp+ `pwd`
</PRE>
</BLOCKQUOTE>
<P>
You should make sure that the xset line happens whenever X is started on
your machine (put it in your .xsession file).
<H2>
  <A NAME="Documentation">Documentation</A>
</H2>
<P>
<A HREF="http://fontforge.sf.net/overview.html">The complete fontforge manual
is available online.</A>
<UL>
  <LI>
    There is a shorter tutorial which
    <UL>
      <LI>
	<A HREF="http://fontforge.sf.net/editexample.html">Is available online</A>
      <LI>
	<A HREF="http://fontforge.sf.net/fontforge-tutorial.pdf">Can be downloaded
	as pdf</A>
      <LI>
	<A HREF="http://fontforge.sf.net/tutorial.tgz">example files </A>(to work
	through the tutorial yourself)
    </UL>
  <LI>
    A documentation tarball can be retrieved from the
    <A HREF="http://sourceforge.net/project/showfiles.php?group_id=103338&amp;package_id=114329">file
    release system</A>
  <LI>
    The cvs tree contains a sub-directory called htdocs containing the manual
    <UL>
      <LI>
	The cvs tree contains a sub-sub-directory called htdocs/ja containing the
	Japanese translation of the manual
    </UL>
    <P>
    See the general comments on the <A HREF="#src-cvs">cvs tree </A>to see how
    to access this.<BR>
    See the section on <A HREF="#installing-documentation-cvs">installing cvs
    documentation </A>to see how to install the docs from the cvs tree
</UL>
<H3>
  <A NAME="doc-tar">Installing a documentation tarball</A>
</H3>
<P>
Once you have downloaded the documentation tarball as described above, you
should move to the directory containing it, and type:
<BLOCKQUOTE>
  <PRE><FONT COLOR="Gray">$ </FONT>su
password: ******
# mkdir -p /usr/local/share/doc/fontforge
# mv fontforge_htdocs*.tgz /usr/local/share/doc/fontforge
# tar xfz fontforge_htdocs*.tgz
# rm fontforge_htdocs*.tgz
</PRE>
</BLOCKQUOTE>
<P>
After doing this fontforge will be able to find the docs on your system when
you press the [F1] (or [Help]) key. If you don't do this fontforge will attempt
to find documentation online.
<P>
  <HR>
<H2>
  Starting FontForge
</H2>
<H3>
  Before starting fontforge on <A NAME="run-cygwin">cygwin</A>
</H3>
<P>
Before you can start fontforge on cygwin you must start the X11 server.<BR>
There are many ways to do this. Here are two.
<OL>
<LI>
On recent cygwin systems just invoke
<BLOCKQUOTE>
  <PRE>C:\cygwin\usr\X11R6\bin\startxwin.bat
</PRE>
</BLOCKQUOTE>
<LI>
On older systems try:
<BLOCKQUOTE>
<P>
Open a cygwin window and type
<BLOCKQUOTE>
  <PRE><FONT COLOR="Gray">$ </FONT>xinit
</PRE>
</BLOCKQUOTE>
<P>
This should create a task window that covers your entire screen, inside of
which there should be an xterm (sort of like the cygwin window earlier).
Be prepared to type commands in this window.
<P>
The first command you must type will start a window manager (which allows
you to move windows around and gives you title bars)
<BLOCKQUOTE>
  <PRE><FONT COLOR="Gray">$ </FONT>twm &amp;
</PRE>
</BLOCKQUOTE>
</BLOCKQUOTE>
<H3>
  Notes on the <A NAME="PATH">PATH</A> variable
</H3>
<P>
On most systems fontforge will install itself into <KBD>/usr/local/bin</KBD>
(that's the standard place for optional software), and this is not always
in the default search path for commands (grrrr). Which means you might have
everything properly installed, but nothing actually works. If you see messages
like <KBD>"fontforge: command not found."</KBD> this has (probably) happened
to you.
<P>
So what do you do?
<P>
You need to set the PATH environment variable so that it includes /usr/local/bin.
The value of the PATH variable is a set of directories separated by colons.
<BLOCKQUOTE>
  <PRE><FONT COLOR="Gray">$ </FONT>echo $PATH
/home/gww/bin:/usr/bin:/bin:/usr/X11R6/bin:/sbin
</PRE>
</BLOCKQUOTE>
<P>
Unfortunately there are two ways of doing this because there are two different
conventions used by unix shells. Type:
<BLOCKQUOTE>
  <PRE><FONT COLOR="Gray">$ </FONT>echo $SHELL
/bin/bash
</PRE>
</BLOCKQUOTE>
<P>
If the name of your shell is <KBD>bash</KBD> (as above), <KBD>ksh</KBD> or
<KBD>sh</KBD> then you want to type
<BLOCKQUOTE>
  <PRE><FONT COLOR="Gray">$ </FONT>PATH=/usr/local/bin:$PATH ; export PATH
</PRE>
</BLOCKQUOTE>
<P>
If the name of your shell is <KBD>tcsh</KBD> or <KBD>csh</KBD> then you say
<BLOCKQUOTE>
  <PRE><FONT COLOR="Gray">$ </FONT>setenv PATH /usr/local/bin:$PATH
</PRE>
</BLOCKQUOTE>
<P>
But you'd have to do that every time you logged in. Instead you want this
included in the shell's initialization. Again there are two cases, for the
<KBD>bash</KBD> family of shells you want to edit the file
<KBD>~/.profile</KBD> while for the <KBD>csh</KBD> family you want to edit
the file <KBD>~/.login</KBD>. On a bash system the following command is generally
sufficient:
<BLOCKQUOTE>
  <PRE><FONT COLOR="Gray">$ </FONT>cat &gt;&gt;~/.profile
PATH=/usr/local/bin:$PATH ; export PATH
^D
</PRE>
</BLOCKQUOTE>
<P>
(where <KBD>^D</KBD> represents control-D, obtained by holding down the control
key while depressing <KBD>d</KBD>. <BR>
And for the csh family you would type:
<BLOCKQUOTE>
  <PRE><FONT COLOR="Gray">$ </FONT>cat &gt;&gt;~/.login
setenv PATH /usr/local/bin:$PATH
^D
</PRE>
</BLOCKQUOTE>
<H3>
  <A NAME="Starting">Starting</A> fontforge from the command line
</H3>
<BLOCKQUOTE>
  <KBD><FONT COLOR="Gray">$ </FONT>fontforge font.pfa font2.sfd font3.ttf font4.otf
  </KBD>
</BLOCKQUOTE>
<P>
will start fontforge looking at the fonts you specify on the command line.
It can read either pfb or pfa fonts, and some ps fonts (type 0 fonts based
on a type 1 dictionary) as well as truetype fonts, open type fonts and many
other formats.
<BLOCKQUOTE>
  <KBD><FONT COLOR="Gray">$ </FONT>fontforge -new</KBD>
</BLOCKQUOTE>
<P>
will cause fontforge to create a new font (in iso-8859-1 encoding)
<BLOCKQUOTE>
  <KBD><FONT COLOR="Gray">$ </FONT>fontforge</KBD>
</BLOCKQUOTE>
<P>
will open up a file picker dialog and allow you to browse till you've found
a font file (or have created a new one).
<BLOCKQUOTE>
  <KBD><FONT COLOR="Gray">$ </FONT>fontforge -script script.pe fonts...</KBD>
</BLOCKQUOTE>
<P>
This will invoke fontforge in a non-interactive mode, and have it run the
named script. Any further arguments on the command line will be passed as
arguments to the script and processed (or not) by it.
<P>
<HR>
<H3>
  <A NAME="cygwin-troubles">Troubleshooting</A> on cygwin
</H3>
<P>
One very common problem on cygwin is that you will type in the command line
to start fontforge -- and absolutely nothing will happen. The cygwin shell
simply prints another prompt. There is no error message. No window appears.
Nothing.
<P>
This generally means that you are missing a required library. Make sure that
the following are installed
<UL>
  <LI>
    libiconv
  <LI>
    libintl
  <LI>
    libjpeg
  <LI>
    libpng
  <LI>
    libxml2
  <LI>
    libz
</UL>
<P>
(I have no idea why you don't get an error message. That's a bug in cygwin
or windows or something. FontForge never gets control and has no chance to
generate a message itself).
<H2>
  Reporting <A NAME="Bugs">Bugs</A>
</H2>
<P>
Please report bugs by sending an e-mail to
<A HREF="mailto:fontforge-devel@lists.sourceforge.net">fontforge-devel@lists.sourceforge.net</A>
</BODY></HTML>
